#include "sChecks.h"
sChecks::~sChecks()
{
   cClear();
}
sChecks::sChecks()
{
   cClear();
}

int             sChecks::cClear()
{
   check = NULL;
   return 0;
}

int             sChecks::SetCnt(HWND hwnd)
{
   check = hwnd;
   return 0;
}

int             sChecks::value()
{

   return SendMessage(check, BM_GETCHECK, 0, 0);
}

int             sChecks::value(u8 Val)
{
   if (Val < 3)
   {
      SendMessage(check, BM_SETCHECK, Val, 0);
   } else
   {
      sMessage("Bad checkbox value");
   }
   return 0;
}

int             sChecks::State(bool flag)
{
   EnableWindow(check, flag);
   return 0;
}

int             sChecks::State()
{

   return IsWindowEnabled(check);
}
